Memory management is essential when memory is to be allocated to one or more process(s) or software application(s) dynamically on a system such as, but not limited to, a computer. Many programming languages like C, C++ provide many utilities for managing an application's memory usage. However, unlike other programming languages, Java programming language does not expose or provide utilities to manage effectively an application's memory usage. A Java application developer may have to pay special attention to manage system resources for their internal objects or software applications. Likewise, an application server administrator can thoroughly monitor applications, which they deploy to ensure that there are no leaks in the application, which could potentially degrade the server's performance. A new problem area has been exposed by systems, which allow an end-user increasingly granular control over a running application.
For example, consider a mashable application, targeted at line-of-business users, which allows the user to provide a relational query to extract purchase information to use in a dashboard. The user wants to pull all purchases for customer X to display in their dashboard, but neglects or forgets to specify the customer for which to pull the purchases. This may result in the user selecting all data from the purchase table—if the table is sufficiently large, for example 50 million rows, then the user has just created a potential memory leak in the mashable application and potentially crashed the database server.
In light of above discussion and limitations of the existing techniques or solutions for memory management in Java, there exists a need for systems and methods for managing memory in an effective manner.